<template>
    <div class="use-hooks">
        <h1>自定义hooks</h1>
        <br>
        <div>求和：{{ sum }}----放大100倍后的值：{{ bigSum }}</div>
        <button @click="getSum(1)">点击+1</button>
        <br>
        <img v-for="(item,index) in dogList" :src="item" :key="index">
        <button @click="getDogList">addDog</button>
    </div>
</template>

<script lang="ts" setup name="UseHooks">
import useSum from '@/hooks/useSum';
import useDog from '@/hooks/useDog';

const {getSum,sum,bigSum} = useSum();
const {getDogList,dogList} = useDog();
</script>

<style scoped>
img{
    padding-right:10px;
}
</style>